package com.usian.admin.controller.v1;

import com.usian.admin.service.AdUserService;
import com.usian.apis.admin.AdUserControllerApi;
import com.usian.model.admin.dtos.AdUserDto;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/api/v1/login")
public class AdUserController  implements AdUserControllerApi {

    @Autowired
    AdUserService adUserService;

    @PostMapping("/in")
    @Override
    public ResponseResult login(@RequestBody AdUserDto dto) {
        return adUserService.login(dto);
    }

   @PostMapping("/mes/{id}")
    @Override
    public ResponseResult mes(@PathVariable("id") Integer id) {
        return adUserService.mes(id);
    }



}
